<?php

if (!defined('libs')) {
    header('Location: ../404error.php');
}

class dbClass {

    var $datos;
var $con;
    function __construct() {
        include_once config . '/datos.php';
        $this->datos = new datos();
    }

    function consultaDB($query) {
        $this->con = mysql_connect($this->datos->hostDB, $this->datos->userDB, $this->datos->passwordDB);
        if (!$this->con) {
            die('Error de conexión ' . mysql_error());
        } else {
            
        }
        mysql_select_db($this->datos->nameDB);
        $query = mysql_query($query);
        return $query;
        mysql_close($this->con);
    }
}
?>